#Code options
#----------------------------------------------------------
OPT += -DONE_LOG            # Default is to write one log per process

# Comp mode selection
#----------------------------------------------------------
COMPMODE = "optimised"
#COMPMODE = "debug"

# System selection
#----------------------------------------------------------
include Makeopt.intel.green

# Compilation
#----------------------------------------------------------
OPTIONS         = $(OPT)
EXEC            = select_particles
OBJS            = vars.o get_unit.o read_parameterfile.o memory.o io.o indexx_module.o rb_seek.o selection.o main.o

%.o: %.f Makefile
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS) -c $<

%.o: %.f90 Makefile
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS) -c $<

%.o: %.F90 Makefile
	$(FC) $(FOPT) $(INC) $(MOD) $(OPTIONS) -c $<

$(EXEC): Makefile $(OBJS)
	$(FC) $(FOPT) $(INC) $(OPTIONS) $(LIB) $(OBJS) $(MOD) $(RUN) -o $(EXEC)

clean:
	\rm -f *.x *.o *~ *.mod $(EXEC)

